<?php
namespace app\common\controller;

use think\Controller;
use think\Db;

class PartnerBase extends Controller
{
    
    public function _initialize(){
    	
    	parent::_initialize();
       
    	if (empty(session('partnerid'))) 
    	{
    		return $this->redirect('login/index');
    	}

    	$admininfo = Db::table('yup_partner')->where('id',session('partnerid'))->find();

    	if (!$admininfo || $admininfo['is_disable'] == 1) {
    		 
    		 return $this->redirect('login/index');
    	}

    }
}
